package com.brillilab.service.module.message.template.impl.usercenter;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: ApplyJoinLabWaitAuditTemplate
 * @ProjectName brill_lab
 * @Description: TODO
 * @date 2019/9/23 16:09
 */
@Data
public class ApplyJoinLabWaitAuditTemplate extends AbstractMessageTemplate {
    private String labName;
    private String applyUserName;

    /**
     * 跳转信息，此处为被添加用户的用户Id
     */
    private Long referId;

    /**
     * 用户申请加入实验室待审核
     *
     * @param labId       实验室ID
     * @param receiverId  接收人Id
     * @param labMemberId 接收者实验室成员Id
     * @param labName     实验室名称
     * @param regUserName 注册用户姓名
     * @param referId     业务关联ID
     */
    public ApplyJoinLabWaitAuditTemplate(Long labId, Long receiverId, Long labMemberId, String labName, String applyUserName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.ApplyJoinLabWaitAudit.getValue());
        super.setTitle(applyUserName + "申请加入实验室");
        String content = String.format(
                "<span style='color:#F6AC2D'>%s</span>" + "<span>申请加入</span>" + "<span style='color:#F6AC2D'>%s</span>"
                , applyUserName, labName);
        super.setContent(content);
        super.setAppContent(String.format("%s申请加入%s", applyUserName, labName));
        super.setLabMemberId(labMemberId);
        super.setLabId(labId);
        this.labName = labName;
        this.applyUserName = applyUserName;
        super.setReferId(referId);
    }
}
